// 套装管理
import request from "@/utils/requset";
// 获取分类列表
export const getSuitCategoryAPI = () => request.get(`Suit/goodsCategory`);

// 套装分类启用禁用
export const setStatusAPI = (id, val) =>
  request.post(`Suit/qiyongCategory?id=${id}/`, val);

// 添加分类
export const addCategoryApi = (value) =>
  request.post(`Suit/addCategory/`, value);

// 删除分类
export const delCategoryAPI = (id) =>
  request.post(`Suit/deleteCategory?id=${id}`);

// 回显
export const getBackAPI = (id) =>
  request.post(`Suit/editCategory?id=${id}/`);

// 修改分类
export const updateCategoryAPI = (id, value) =>
  request.post(`Suit/editCategoryTo?id=${id}/`, value);

// 获取商品列表
export const getShopListAPI = () => request.get(`Suit/goodsList/`);

// 添加商品
export const addShopAPI = (value) => request.post(`Suit/addGoods/`, value);

// 删除商品
export const delShopAPI = (id) => request.post(`Suit/deleteGoods?id=${id}`);

// 回显
export const getBackShopAPI = (id) => request.post(`Suit/editGoods?id=${id}`);

// 修改商品
export const updateAPI = (id, value) =>
  request.post(`Suit/editGoodsTo?id=${id}/`, value);
